process: correctly parse Unicode in NODE_OPTIONS#34476
Closed
bzoz wants to merge 5 commits intonodejs:masterfrom
Closed
process: correctly parse Unicode in NODE_OPTIONS#34476bzoz wants to merge 5 commits intonodejs:masterfrom
bzoz wants to merge 5 commits intonodejs:masterfrom
Conversation
Collaborator
addaleax
approved these changes
Jul 22, 2020
jasnell
approved these changes
Jul 22, 2020
Collaborator
devsnek
approved these changes
Jul 22, 2020
lundibundi
approved these changes
Jul 22, 2020
Comment on lines
11
to
20
Member
There was a problem hiding this comment.
Nit:
Suggested change
| const NODE_OPTIONS = `--redirect-warnings=${expected_redirect_value}`; | |
| const result = cp.spawnSync(process.argv0, | |
| ['--expose-internals', __filename, 'test'], | |
| { | |
| env: { | |
| NODE_OPTIONS | |
| } | |
| }); | |
| const env = { NODE_OPTIONS: `--redirect-warnings=${expected_redirect_value}` }; | |
| const result = cp.spawnSync(process.argv0, | |
| ['--expose-internals', __filename, 'test'], | |
| { env }); |
Member
There was a problem hiding this comment.
Nit: I'd prefer to have explicit check for 'child process' case (i.e. if (process.argv[2] === 'test') {) instead to handle possibly different test start args.
Member
There was a problem hiding this comment.
Suggested change
| const result = cp.spawnSync(process.argv0, | |
| const result = cp.spawnSync(process.execPath, |
This was referenced Jul 23, 2020
f5f8a79 to
1a31d81
Compare
Collaborator
Contributor
Author
|
Fixed some nits and rebased. |
This was referenced Aug 13, 2020
Collaborator
This was referenced Aug 14, 2020
Contributor
Author
|
Ok, this is weird. This fails only on It looks like other tests can spawn new Node instances just fine. I'm stuck here 🤔 |
cjihrig
reviewed
Aug 20, 2020
Contributor
There was a problem hiding this comment.
Does this help with the current CI failure?
Suggested change
| env: { NODE_OPTIONS }, | |
| env: { ...process.env, NODE_OPTIONS }, |
Contributor
Author
There was a problem hiding this comment.
Yes, it helped. Thanks!
Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed correctly. Fixes: nodejs#34399
398d7d5 to
15ac48a
Compare
Contributor
Author
bzoz
added a commit
to JaneaSystems/node
that referenced
this pull request
Aug 20, 2020
Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed correctly. Fixes: nodejs#34399 PR-URL: nodejs#34476 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Contributor
Author
|
Green CI, landed in de565ad |
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes an issue on Windows, where Unicode in NODE_OPTIONS was not parsed
correctly.
Fixes: #34399
Reused the code from
node_env_var.ccfor getting the enviroment variable value.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes